import { Ref } from 'vue';

interface HomePageInfo {
  availableFee: string;
  monthTransactionAmount: string;
  monthTransactionNumber: number;
  dayTransactionAmount: string;
  dayTransactionNumber: null | number;
  yingshouFee: string;
  days: null;
  costs: null;
  merBillList: null;
  waitTask: number;
  waitBill: number;
  waitInvoice: number;
  waitTax: number;
  id: null;
  merId: null;
  sydId: null;
  opId: null;
  channelId: null;
}

const useHomePageInfo = (params:any): {
  data: Ref<HomePageInfo>;
  isLoading: Ref<boolean>;
} => {
  const { data, isLoading } = useRequest(
    '/payment/cover/getCoverInfo',
    'get',
    {
      params
    },
    { immediate: true }
  );
  return { data, isLoading };
};

export { useHomePageInfo };
